<style>
    .winit-file {
        padding: 10px 20px;
    }
    .winit-file .file-title {
        font-size: 23px;
        line-height: 40px;
    }
    .winit-file .prototype-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    .feature-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    pre {
        font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        color: #58666e;
        padding: 0px;
        border: none;
        border-radius: 0px;
    }
    .fr-toolbar {
        display: none;
    }
    .winit-file .prototype-content .panel {
        box-shadow: 0px 0px 0px white;
        -webkit-box-shadow: 0px 0px 0px white;
    }
    .winit-file .prototype-content .panel-info {
        border-color: white;
    }
    .winit-file .prototype-content .panel-info .panel-heading {
        border-color: white;
        color: #58666e;
        background-color: white;
    }
    .winit-file .feature-content .panel {
        box-shadow: 0px 0px 0px white;
        -webkit-box-shadow: 0px 0px 0px white;
    }
    .winit-file .feature-content .panel-info {
        border-color: white;
    }
    .winit-file .feature-content .panel-info .panel-heading {
        border-color: white;
        color: #58666e;
        background-color: white;
    }
    .winit-file .fr-box.fr-basic.fr-top .fr-wrapper {
        border: 1px solid #edf1f2;
        box-shadow: 0px 0px 0px white;
        -webkit-box-shadow: 0px 0px 0px white;
    }
    .winit-file .fr-counter {
        display: none;
    }
    .lv-1{
        padding-top: 6px;
        font-size: 28px;
        font-weight: bold;
        padding-bottom: 6px;
    }
    .lv-2{
        padding-top: 6px;
        font-size: 22px;
        font-weight: bold;
        padding-left: 7px;
        padding-bottom: 4px;
    }
    .lv-3{
        font-size: 16px;
        padding-left: 7px;
        padding-bottom: 4px;
    }
</style>
<div class="wrapper-md ng-scope winit-file mm-loading-file" id="fileContent">
    <m-form-lable title="">
        <div class="pull-right" ng-hide="$ctrl.selectType != 'file'">
            <i class="fa fa-expand fa-fw" ng-show="!isFullScreen" ng-click="requestFullScreen()"></i>
            <i class="fa fa-compress fa-fw" ng-show="isFullScreen" ng-click="exitFullscreen()"></i>
        </div>
        <div ng-if="info.fileBg">
            <div class="lv-1 m-t-none">1、项目背景</div>
            <div class="form-group">
                <div class="col-sm-12">
                    <m-wysiwyg mhtml="info.reqDetails.reqDesc"
                               mid="noticePrototype"
                               is-edit="false" 
                               validate="false" 
                               id="req-desc">
                    </m-wysiwyg>
                    <!--<textarea style="height: 225px;" id="req-desc" class="form-control form-req-desc" ng-model="reqDetails.reqDesc"></textarea>-->
                </div>
                <!--<pre class="lv-3">{{info.reqDetails.reqDesc || "空"}}</pre>-->
            </div>
            <br/>
        </div>

        <div ng-if="info.fileIssue">
            <div class="lv-1 m-t-none">2、用户故事列表</div>
            <div class="form-group" ng-repeat="issue in info.issuesList" ng-show="info.issuesList.length > 0">
                <div class="col-sm-12">
                     <b class="lv-3">{{issue.user}} {{issue.action}}</b>
                </div>
            </div>
            <div class="form-group" ng-show="!info.issuesList">空</div>
            <br/>
        </div>

        <div ng-if="info.fileFlow">

            <div class="lv-1" ng-show="$ctrl.selectType == 'flow'">1、场景流程设计</div>
            <div class="lv-1" ng-show="$ctrl.selectType != 'flow'">3、场景流程设计</div>

            <div class="form-group" ng-repeat="flowData in info.flowData track by $index" ng-if="info.flowData.length > 0">
                <div id="{{flowData.id}}">
                    <div class="lv-2" ng-show="$ctrl.selectType == 'flow'">{{$index+1}}、 {{flowData.name}}</div>
                    <div class="lv-2" ng-show="$ctrl.selectType != 'flow'">{{$index+1}}、 {{flowData.name}}</div>
                </div>
                <div ng-if="$ctrl.selectType == 'file'">
                    <winit-flow-builder diagram-id="{{flowData.id}}+'file001'" 
                                        datas="flowData.flowDatas"
                                        is-fixed-height="true"
                                        min-height="400"
                                        is-show-version="false"
                                        is-readonly="false">
                    </winit-flow-builder>
                    <!-- <winit-diagram diagram-data="flowData" diagram-id="flowData.id+'file001'"></winit-diagram> -->
                </div>
                <div ng-if="$ctrl.selectType == 'flow'">
                    <winit-flow-builder diagram-id="{{flowData.id}}+'flow002'" 
                                        datas="flowData.flowDatas"
                                        is-fixed-height="true"
                                        min-height="400"
                                        is-show-version="false"
                                        is-readonly="false">
                    </winit-flow-builder>
                    <!-- <winit-diagram diagram-data="flowData" diagram-id="flowData.id+'flow002'"></winit-diagram> -->
                </div>
                <div ng-repeat="relate in flowData.relateFeatures | filter: { hasRelate: 'true' }" ng-show="$ctrl.selectType != 'flow' && flowData.relateFeatures.length">
                    <label ng-show="$index == 0">
                        <b>改动的功能</b>
                    </label>
                </div>
                <div class="form-group" ng-show="$ctrl.selectType != 'flow'">
                    <div class="col-sm-4" ng-repeat="relate in flowData.relateFeatures track by $index" ng-click="setLocation(relate)" ng-show="relate.hasRelate">                        
                        <a href="javascript:void(0)">{{relate.type == "PROTOTYPE" ? relate.path : relate.featureName}}</a> 
                    </div>
                </div>
                <br/>
            </div>
            <div class="form-group" ng-show="info.flowData.length == 0">空</div>
            <br/>
        </div>

        <div ng-if="info.fileFeature" infinite-scroll="getReqFeatures()" infinite-scroll-distance='1'>
            
            <div class="lv-1" ng-show="$ctrl.selectType == 'feature'">1、功能设计</div>
            <div class="lv-1" ng-show="$ctrl.selectType != 'feature'">4、功能设计</div>
            
            
            <div class="form-group" ng-repeat="prototype in info.prototypeData track by $index">
                <div id="{{prototype.id}}" class="lv-2">{{$index + 1}}、 {{prototype.path}}(页面)</div>

                <winit-prototype-panel ng-if="$ctrl.selectType == 'feature'" req-id="info.reqId" feature-id="prototype.id" readonly="true" feature-index="1.1.{{$index + 1}}" is-file="true"></winit-prototype-panel>
                <winit-prototype-panel ng-if="$ctrl.selectType != 'feature'" req-id="info.reqId" feature-id="prototype.id" readonly="true" feature-index="4.1.{{$index + 1}}" is-file="true"></winit-prototype-panel>
                <!-- <winit-prototype ng-if="$ctrl.selectType == 'feature'" req-id="info.reqId" feature-id="prototype.id" readonly="true" feature-index="1.1.{{$index + 1}}"></winit-prototype>
                <winit-prototype ng-if="$ctrl.selectType != 'feature'" req-id="info.reqId" feature-id="prototype.id" readonly="true" feature-index="4.1.{{$index + 1}}"></winit-prototype> -->
                <div class="col-sm-12" ng-show="prototype.relateFlows.length > 0" style="margin-top: -15px;">
                    <label class="col-sm-1 control-label">用到的场景：</label>
                    <div class="col-sm-11" style="padding-top: 7px;">
                        <div class="col-sm-4" ng-repeat="flow in prototype.relateFlows track by $index" ng-click="setLocation(flow, 'flow')">
                            <span ng-show="!flow.hasFlow" class="hide">{{$index}}：{{flow.flowName}}</span>
                            <span><a href="javascript:void(0)" class="fa fa-crosshairs">{{flow.flowName}}</a> </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group" ng-repeat="feature in info.featureData track by $index">
                <div id="{{feature.id}}"></div>
                <div id="{{feature.id}}"  class="lv-2">{{$index +1+ info.prototypeData.length}}、 {{feature.featureName}}(功能点)</div>

                <winit-feature-panel ng-if="$ctrl.selectType == 'feature'" req-id="info.reqId" feature-id="feature.id" prd-data="feature" is-prd="{{$ctrl.fileType}}" read-only="false" feature-index="1.{{info.prototypeData.length == 0 ? 1 : 2}}.{{$index + 1}}"></winit-feature-panel>
                <winit-feature-panel ng-if="$ctrl.selectType != 'feature'" req-id="info.reqId" feature-id="feature.id" prd-data="feature" is-prd="{{$ctrl.fileType}}" read-only="false" feature-index="4.{{info.prototypeData.length == 0 ? 1 : 2}}.{{$index + 1}}"></winit-feature-panel>
                <div class="col-sm-12" ng-show="feature.relateFlows.length > 0 && $ctrl.selectType != 'feature'" style="margin-top: -35px;">
                    <label class="col-sm-1 control-label">用到它的场景：</label>
                    <div class="col-sm-11" style="padding-top: 7px;">
                        <div class="col-sm-4" ng-repeat="flow in feature.relateFlows track by $index" ng-click="setLocation(flow, 'flow')">
                            <span ng-show="!flow.hasFlow" class="hide">{{$index}}：{{flow.flowName}}</span>
                            <span><a href="javascript:void(0)" class="fa fa-crosshairs">{{flow.flowName}}</a> </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group" ng-show="info.featureData.length == 0 && info.prototypeData.length == 0">空</div>
            <br/>
        </div>

        <div ng-if="info.fileRemark">
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType == 'remark'">1、上线要求</div>
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType != 'remark'">5、上线要求</div>

            <div class="form-group" ng-repeat="remark in info.remarkData track by $index" ng-show="info.remarkData.length > 0">
                <div class="col-sm-12">
                        <i class="lv-2 fa fa-check">   {{remark.typeName}}  {{remark.description}}</i>
                </div>
            </div>
            <div class="form-group" ng-hide="info.remarkData.length > 0">空</div>
            <br/>
        </div>

        <div ng-if="info.fileNotice">
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType == 'notice'">1、上线公告</div>
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType != 'notice'">6、上线公告</div>

            <div class="form-group" ng-show="info.noticeData.content">
                <m-wysiwyg mhtml="info.noticeData.content" mid="noticePrototypeFile" is-edit="true"></m-wysiwyg>
            </div>
            <div class="form-group" ng-show="!info.noticeData.content">空</div>
            <br/>
        </div>

        <div ng-if="info.fileReportForm">
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType == 'report'">1、报表</div>
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType != 'report'">7、报表</div>

            <div class="form-group"  ng-show="info.reportFormList.length > 0">
                <div class="col-sm-12">
                    <div class="col-sm-2" ng-repeat="reportForm in info.reportFormList track by $index">
                        <a href="javascript:void(0);" ng-click="downloadFile(reportForm.id);" title="下载文件">{{reportForm.fileName}}</a>
                    </div>
                </div>
            </div>
            <div class="form-group" ng-hide="info.reportFormList.length > 0">空</div>
        </div>

        <div ng-if="info.fileManual">
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType == 'manual'">1、用户手册变更</div>
            <div class="lv-1 m-t-none" ng-show="$ctrl.selectType != 'manual'">8、用户手册变更</div>

            <table class="table table-bordered" ng-if="info.manualData.length > 0">
                <tr ng-repeat="manual in info.manualData track by $index">
                    <td style="width: 5%;">{{$index + 1}}</td>
                    <td style="width: 30%;">{{manual.path}} /{{manual.featureName}}</td>
                    <td><a href="javascript:void(0);" ng-click="openUrl(manual)">{{ manual.attr ? (manual.attr.url || "未定义") : "未定义" }}</a></td>
                </tr>
            </table>
            <div class="form-group" ng-hide="info.manualData.length > 0">空</div>
        </div>
    </m-form-lable>
</div>
<div class="row">
    <div class="col-sm-12 mm-loading-file-icon" style="text-align: center; display: none; padding-top: 25%;">
        <i class="fa fa-spinner fa-spin fa-4x fa-fw" style="color: rgb(158, 149, 149);"></i>
    </div>
</div>